home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / SCHEME / GNU / SCM4E1 / !Scm / slib / mulapply < prev    next >
Text File  |  1994-02-27  |  324b  |  12 lines

  1. ;;;; "multapply.scm" Redefine APPLY take more than 2 arguments.
  2.  
  3. (define two-arg:apply apply)
  4. (define apply
  5.   (lambda args
  6.     (two-arg:apply (car args) (apply:append-to-last (cdr args)))))
  7.  
  8. (define (apply:append-to-last lst)
  9.   (if (null? (cdr lst))
  10.       (car lst)
  11.       (cons (car lst) (apply:append-to-last (cdr lst)))))
  12.